/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ac.za.cput.kleintjes.question3.ocp.violates.testing;

import ac.za.cput.kleintjes.question3.ocp.violates.conf.MemberConfig;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import ac.za.cput.kleintjes.question3.ocp.violates.model.Member;
import ac.za.cput.kleintjes.question3.ocp.violates.model.MemberStandard;
import ac.za.cput.kleintjes.question3.ocp.violates.services.IMember;
import junit.framework.Assert;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;

/**
 * @author Hughan.Kleintjes.hughanK@gmail.com
 */
public class IMemberJUnitTestv {
    private static ApplicationContext ctx;
    private static IMember member;
    
    public IMemberJUnitTestv() {
    }

    @BeforeClass
    public static void setUpClass() throws Exception {
        ctx = new AnnotationConfigApplicationContext(MemberConfig.class);
        member = (IMember)ctx.getBean("member");
    }

    @AfterClass
    public static void tearDownClass() throws Exception {
    }

    /**
     * Test of calculateFee method, of class IMember.
     */
    @Test
    public void testCalculateStandardFee() {
        System.out.println("calculateFee");
        Member std = new MemberStandard(1000.00);
        Assert.assertEquals(1000.00, member.calculateFee(std) );
    }

}
